
Technical Q&A's
TB 07 - HMShowBalloon styled TEHandle limit and Workaround (1-May-95)
Q Sometimes balloons won't show up when I call HMShowBalloon; I get a paramErr
(-50) instead. The hmHelpType is khmmTEHandle. The HMShowBalloon function calls
TextWidth on the hText of my TEHandle (the result of which is 1511 (338
chars)), then multiplies that by the lineHeight (12), yielding 18132. It then
compares this to 17000, doesn't like the result, puts -50 into a register and
backs out of everything it has done previously. What is the Help Manager
doing?
A The Help Manager checks against 17000 to ensure that the help balloon window is
always smaller than the Macintosh system screen. However, the value used
(17000) should be a much larger value. As it is right now in System 7, you're
limited to about the same number of characters with a styled TEHandle as you
are with a Pascal string: 255 characters.
To avoid this limitation, use clear concise phrases to make your help system as
short as possible. If you've already done that and your help message still
isn't short enough, you can use khmmPict or khmmPictHandle and use a picture
for your help message. Using a picture has the disadvantage that pictures use a
little more memory for the same help message and you'll have to add carriage
returns for the line breaks yourself where you need them. You can use MacDraw
or a similar program to create the pictures.
Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Main |
Page One |
What's New |
Apple Computer, Inc. |
Find It |
Contact Us |
Help